/**
 * Copyright (c) www.bugull.com
 */
package com.bugull.farm.core.store;

import java.util.Date;

import com.bugull.mongo.SimpleEntity;
import com.bugull.mongo.annotations.EnsureIndex;
import com.bugull.mongo.annotations.Entity;

/**
 * 手机客户端用户
 * 
 * @author baoyb [baoyb@ohbuy.net]
 *
 */
@Entity(name = "user")
@EnsureIndex(value="{username:1}")
public class User extends SimpleEntity {

	public static final int PHONE_ANDROID = 1;
	public static final int PHONE_IOS = 2;
	
	private String username; // 用户名
	private String password; // 密码
	private Date createTime; // 注册时间
	private Date updateTime; // 修改时间
	private int loginCount; // 登录次数
	private Date lastLoginTime; // 最后登录时间
	private String lastLoginIp; // 最后登录的ip地址
	private int appType;//APP类型：1为Android手机，2为iphone手机
	private String appVersion;//APP  “1.1.0”
	private String remark; // 备注
	private String osVersion;//系统版本
	private String phoneModel;//手机型号
	private String address;//地址，用来显示
	

	public User() {
		
	}
	
	public User(String id) {
		this.id = id;
	}
	
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public int getLoginCount() {
		return loginCount;
	}

	public void setLoginCount(int loginCount) {
		this.loginCount = loginCount;
	}

	public Date getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public String getLastLoginIp() {
		return lastLoginIp;
	}

	public void setLastLoginIp(String lastLoginIp) {
		this.lastLoginIp = lastLoginIp;
	}

	public int getAppType() {
		return appType;
	}

	public void setAppType(int appType) {
		this.appType = appType;
	}

	public String getAppVersion() {
		return appVersion;
	}

	public void setAppVersion(String appVersion) {
		this.appVersion = appVersion;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getOsVersion() {
		return osVersion;
	}

	public void setOsVersion(String osVersion) {
		this.osVersion = osVersion;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getPhoneModel() {
		return phoneModel;
	}

	public void setPhoneModel(String phoneModel) {
		this.phoneModel = phoneModel;
	}
	
}
